import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  reactStrictMode: true,
  // 配置代理规则
  async rewrites() {
    return [
      {
        source: "/api/proxy/:path*",
        destination: "http://admin.insp.test.tz-group.com/proapi/:path*",
      },
    ];
  },
  images: {
    domains: ["oss.tz-group.com"], // 添加你的OSS域名
    // 或者使用 remotePatterns（推荐方式）
    remotePatterns: [
      {
        protocol: "https",
        hostname: "oss.tz-group.com",
        port: "",
        pathname: "/**", // 允许所有路径
      },
    ],
  },
};

export default nextConfig;
